package com.xhwl.data.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xhwl.common.pojo.ResultJson;
import com.xhwl.common.pojo.workbench.BlockCount;
import com.xhwl.common.pojo.workbench.MyTask;
import com.xhwl.common.query.workbanch.MyTaskQuery;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: luyi
 * @Description: 我的待办
 * @Date: Create in 14:30 2021/8/11
 */
@RestController
public interface IMyTaskService {

    /**
     * 创建我的待办
     *
     * @param myTask    待办任务实体
     * @param accountId 关联帐号id
     * @return
     */
    @RequestMapping(value = "/my-task-service/create", method = RequestMethod.POST)
    ResultJson create(@RequestPart("myTask") MyTask myTask, @RequestPart("accountId") List<Integer> accountId);

    @RequestMapping(value = "/my-task-service/page", method = RequestMethod.POST)
    Page<MyTask> page(@RequestPart("myTaskQuery") MyTaskQuery myTaskQuery, @RequestPart("page") Page page);

    List<BlockCount> countBlockType(MyTaskQuery myTaskQuery);
}
